From: Jasper St. Pierre Date: Fri, 29 Jun 2012 05:40:17 +0000 (-0400) Subject: extensionUtils: Don't crash on startup for an empty directory X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6355 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1363d30f7915e4b4ae116dd6cd29ca215bd2cf72;p=gnome-shell.git extensionUtils: Don't crash on startup for an empty directory https://bugzilla.gnome.org/show_bug.cgi?id=679099 --- diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js index cec24ba1d..40e001bbe 100644 --- a/js/misc/extensionUtils.js +++ b/js/misc/extensionUtils.js @@ -177,7 +177,14 @@ const ExtensionFinder = new Lang.Class({ log('Extension %s already installed in %s. %s will not be loaded'.format(uuid, existing.path, extensionDir.get_path())); continue; } - let extension = createExtensionObject(uuid, extensionDir, type); + + let extension; + try { + extension = createExtensionObject(uuid, extensionDir, type); + } catch(e) { + logError(e, 'Could not load extension %s'.format(uuid)); + continue; + } this.emit('extension-found', extension); } fileEnum.close(null);